package com.example.demo.aspect;

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
    自定义切面类
 */
@Aspect
@Configuration
public class MyAspect {

    @Before("execution(* com.example.demo.service.TestService.*(..))")
    public void before(){
        System.out.println("执行前置增强。。。");
    }


    @After("execution(* com.example.demo.service.TestService.service1(..))")
    public void after(){
        System.out.println("执行后置增强。。。");
    }

}
